from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
# 设置环境变量
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings.conf_web')
# 注册Celery的APP
app = Celery('dxz_celery')
# 绑定配置文件
app.config_from_object('settings.celery_conf')
# 自动发现各个app下的tasks.py文件
app.autodiscover_tasks()

# win: celery -A celery_main worker -l info --concurrency=4  -P eventlet
